var i = 3;
var intervalID;
function animation() {
	document.getElementById('digit').textContent = i;
	--i;
	if(0 == i) { 
		clearInterval(intervalID);
		location.href = "index.php";
	}
}
window.onload = function() {
	intervalID = setInterval(animation, 1000);
}			
